<template>
  <div class="error-container">
    <div class="error-content">
      <img src="@/assets/images/404.svg" alt="404" class="error-image" />
      <h1 class="error-title">404</h1>
      <h2 class="error-subtitle">页面未找到</h2>
      <p class="error-description">
        抱歉，您访问的页面不存在或已被移除。
      </p>
      <div class="error-actions">
        <el-button type="primary" @click="goBack">返回上一页</el-button>
        <el-button @click="goHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goBack = () => {
  router.go(-1)
}

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f8fc;
}

.error-content {
  text-align: center;
  padding: 40px;
}

.error-image {
  max-width: 300px;
  margin-bottom: 20px;
}

.error-title {
  font-size: 72px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #3E78B2, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.error-subtitle {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #1A2634;
}

.error-description {
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}
</style> 